;
layui.define(["table", "form"],
function(e) {
    var $ = layui.$,
    i = (layui.$, layui.admin),
    t = layui.view,
    l = layui.table,
    r = layui.form;
    var sale_id = 0;
    if(layui.params && layui.params.id){
        sale_id = layui.params.id;
        layui.sale_id = sale_id;
        layui.params = {};
    }
    l.render({
        elem: "#LAY-salecards-manage",
        url: layui.setter.baseUrl+"sale/cards?id="+sale_id,
        cols: [[{
            field: "nickname",
            title: "用户",
            minWidth: 100,
            templet: "#memberTpl"
        },
        {
            field: "code",
            title: "核销码",
        },
        {
            field: "status",
            title: "状态",
            templet: "#cardstatusTpl"
        },
        {
            field: "createtime",
            title: "领券时间",
            templet: "#createtimeTpl"
        }]],
        page: !0,
        limit: 10,
        text: {
            none: '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
        }
    }),
    l.on("tool(LAY-salecards-manage)",
    function(e) {
        // var l = e.data;
        // if("" === e.event){
            
        // }
    }),
    e("salecards", {})
});